FROM alpine:latest

MAINTAINER FrankEvil <FrankEvils@163.con>

COPY AriaNg-1.1.3.zip /AriaNg-1.1.3.zip
RUN apk update \
	&& apk add --no-cache --update aria2 darkhttpd \
	&& mkdir /aria2 /aria2/conf /aria2/conf-temp /aria2/downloads /aria-ng \
	&& unzip AriaNg-1.1.3.zip -d aria-ng \
	&& rm -rf AriaNg-1.1.3.zip

COPY init.sh /aria2/init.sh
COPY conf-temp /aria2/conf-temp

WORKDIR /
VOLUME ["/aria2/conf", "/aria2/downloads"]
EXPOSE 6800 80 8080

CMD ["/aria2/init.sh"]
